package dao.models;

import java.util.List;

public class Chapter implements Comparable<Chapter> {

    private int id;
    private String name;
    private String text;
    private List<Question> questions;

    public int getId() {
	return id;
    }

    public void setId(int id) {
	this.id = id;
    }

    public String getName() {
	return this.name;
    }

    public void setName(String name) {
	this.name = name;
    }

    public String getText() {
	return this.text;
    }

    public void setText(String text) {
	this.text = text;
    }

    public List<Question> getQuestions() {
	return this.questions;
    }

    public void setQuestions(List<Question> questions) {
	this.questions = questions;
    }

    @Override
    public String toString() {
	return "Chapter [id=" + this.id + ", name=" + this.name + ", text="
		+ this.text + ", questions=" + this.questions + "]";
    }

    @Override
    public int compareTo(Chapter o) {
	return id - o.getId();
    }
}
